package com.hyzh.latte.sand;

import com.hyzh.latte.vehicle.socket.CommandType;

import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author songkui
 * @since 2024/3/21 1:02
 */
public enum SandClientTypeEnum {
    PC("PC"), //PC
    MT("MT"); //MT

    private String code;

    SandClientTypeEnum(String code) {
        this.code = code;
    }

    public String code(){
        return this.code;
    }

    private static Map<String, SandClientTypeEnum> map = Arrays.stream(SandClientTypeEnum.values())
            .collect(Collectors.toMap(SandClientTypeEnum::code, rtype -> rtype));

    public static SandClientTypeEnum valueOfCode(String code) {
        return map.get(code);
    }

}
